package com.lxw.manage.media.controller;

import com.lxw.api.media.MediaFileControllerApi;
import com.lxw.framework.domain.media.request.QueryMediaFileRequest;
import com.lxw.framework.model.response.QueryResponseResult;
import com.lxw.framework.model.response.ResponseResult;
import com.lxw.manage.media.service.MediaFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 媒资文件管理controller主要负责文件的增删改查等功能
 */
@RestController
@RequestMapping("/media/file")
public class MediaFileController implements MediaFileControllerApi {

    @Autowired
    private MediaFileService mediaFileService;
    @Override
    @GetMapping("/list/{page}/{size}")
    public QueryResponseResult findList(@PathVariable("page") Integer page, @PathVariable("size") Integer size,QueryMediaFileRequest queryMediaFileRequest) {
        return mediaFileService.findList(page,size,queryMediaFileRequest);

    }
    @Override
    @GetMapping("/dispose/{id}")
    public ResponseResult dispose(@PathVariable("id")String id){
        return mediaFileService.dispose(id);
    };
}
